package designPattern.decorator2.skillsAndAttack
{
	import designPattern.decorator2.DecoratorHero;
	import designPattern.decorator2.Hero;
	
	public class Skill_B extends DecoratorHero
	{
		private var hero:Hero;
		protected var _skill_B;
		
		public function Skill_B(hero:Hero)
		{
			this.hero = hero;
			this._skill_B = "skill_B";
		}
		
		override public function useSkill(skillType:String):String
		{
			var skill:String = hero.useSkill(skillType);
			if(skill == this.NULL_SKILL)
			{
				if(skillType == "B")
				{
					return this._skill_B;
				}
			}
			else
			{
				return skill;
			}
			return this.NULL_SKILL;
		}
	}
}